using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class Press_TVManagerMap : EntityTypeConfiguration<Press_TVManager>
    {
        public Press_TVManagerMap()
        {
            // Primary Key
            this.HasKey(t => t.TVmanager_id);

            // Properties
            this.Property(t => t.locale)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.headline_cs)
                .HasMaxLength(80);

            this.Property(t => t.headline_en)
                .HasMaxLength(240);

            this.Property(t => t.videocode)
                .HasMaxLength(1000);

            // Table & Column Mappings
            this.ToTable("Press_TVManager");
            this.Property(t => t.TVmanager_id).HasColumnName("TVmanager_id");
            this.Property(t => t.locale).HasColumnName("locale");
            this.Property(t => t.headline_cs).HasColumnName("headline_cs");
            this.Property(t => t.headline_en).HasColumnName("headline_en");
            this.Property(t => t.displaydate).HasColumnName("displaydate");
            this.Property(t => t.videocode).HasColumnName("videocode");
            this.Property(t => t.rank).HasColumnName("rank");
            this.Property(t => t.videoimage_id).HasColumnName("videoimage_id");
        }
    }
}
